let args = [
    1, "'a'", "$event" , "msg"
]
var vm = {msg:'hello'}
const actualArgs = args.map(arg=>{
    if(!isNaN(arg)) return arg;
    if(arg === '$event') return {type:'event'};
    if(arg.startsWith("'") && arg.endsWith("'"))return arg.slice(1,-1);
    return vm[arg];
});
console.log(actualArgs)